package com.example.demo.util;

public class Strdelectbrforeandlast {

    /*public static void main(String[] args) {

        String str="[{name=majunfeng,age=24},{name=kk,age=27}]";
        String hh=delete(str);
        System.out.println(hh);

        String hh1=delete(hh);
        System.out.println(hh1);

    }*/

    //去除字符串头尾字符，像什么list字符串去除中括号
    public String delete(String str){
        str=str.substring(1,str.length());
        str=str.substring(0,str.length()-1);

        return str;
    }
}
